package Classes.GameViews.ViewImgs// ActionScript file
{
	import MV_BMP.MovieClip_BMP;

	public class CVI_Zombie extends CartoonViewImg
	{
		private var _faceDir:int=4;/*朝向*/
		private var _isMoveing:Boolean;/*移动状态*/
		public function CVI_Zombie(baseName:String):void
		{
			super(baseName);
		}
		
		override protected function getMyTmpSourceName():String
		{
			return "test0000";
		}
		
		override protected function getMyCartoonsStrAry():Array
		{
			return ["moveDown","moveUp"];
		}
		
		public function playNowCartoon(cartoonStr:String):void
		{
			var playDir:String;
			switch(this.faceDir)
			{
				case 1:
					this.cartoonLayer.scaleX=-1;
					this.cartoonLayer.x=this.cartoonLayer.width;
					playDir="Up";
					break;
				case 3:
					this.cartoonLayer.scaleX=1;
					this.cartoonLayer.x=0;
					playDir="Up";
					break;
				case 3:
					this.cartoonLayer.scaleX=-1;
					this.cartoonLayer.x=this.cartoonLayer.width;
					playDir="Down";
					break;
				case 4:
					this.cartoonLayer.scaleX=1;
					this.cartoonLayer.x=0;
					playDir="Down";
					break;
			}
			var returnCartoon:MovieClip_BMP;
			switch(cartoonStr)
			{
				case "move":
					this.playCartoon("move"+playDir);
					this.isMoveing=true;
					break;
				case "stop":
					returnCartoon=this.playCartoon("move"+playDir);
					returnCartoon.stop();
					this.isMoveing=false;
					break;
			}
		}

		/*getter & setter*/
		public function get faceDir():int
		{
			return _faceDir;
		}

		public function set faceDir(value:int):void
		{
			_faceDir = value;
		}

		public function get isMoveing():Boolean
		{
			return _isMoveing;
		}

		public function set isMoveing(value:Boolean):void
		{
			_isMoveing = value;
		}


	}
}